package com.ruoyi.project.registration.service.impl;

import com.ruoyi.project.registration.domain.RegRegistration;
import com.ruoyi.project.registration.mapper.RegRegistrationMapper;
import com.ruoyi.project.registration.service.RegRegistrationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RegRegistrationServiceImpl implements RegRegistrationService {
    @Autowired
    private RegRegistrationMapper regRegistrationMapper;

    /**
     * 多条件查询挂号列表
     * */
    @Override
    public List<RegRegistration> selectList(RegRegistration regRegistration) {
        return regRegistrationMapper.selectRegRegistration(regRegistration);
    }


    @Override
    public int updateRegistration(RegRegistration regRegistration) {
        return regRegistrationMapper.update(regRegistration);
    }

    @Override
    public RegRegistration getByNo(Integer rrNo) {
        return regRegistrationMapper.selectByNo(rrNo);
    }

    @Override
    public List<RegRegistration> getAll() {
        return regRegistrationMapper.selectAll();
    }

    /**
     * 新增挂号
     * */
    @Override
    public int insertRegRegistration(RegRegistration regRegistration) {
        return regRegistrationMapper.insert(regRegistration);
    }
}
